import request from '@/utils/request'

// 创建评论
export function createProductReply(data) {
  return request({
    url: '/store/product-reply/create',
    method: 'post',
    data: data
  })
}

// 更新评论
export function updateProductReply(data) {
  return request({
    url: '/store/product-reply/update',
    method: 'put',
    data: data
  })
}

// 删除评论
export function deleteProductReply(id) {
  return request({
    url: '/store/product-reply/delete?id=' + id,
    method: 'delete'
  })
}

// 获得评论
export function getProductReply(id) {
  return request({
    url: '/store/product-reply/get?id=' + id,
    method: 'get'
  })
}

// 获得评论分页
export function getProductReplyPage(params) {
  return request({
    url: '/store/product-reply/page',
    method: 'get',
    params
  })
}
// 导出评论 Excel
export function exportProductReplyExcel(params) {
  return request({
    url: '/store/product-reply/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}